const Router = require('koa-router')
const addressRouter = new Router({ prefix: '/address' })
const {
  verifyAuth
} = require('../middleware/auth.middleware')
const { add_address, get_all_address, delete_address, get_address, update_address } = require('../controller/address.controller')
const { verifyDefault } = require('../middleware/address.middleware')

addressRouter.post('/add_address', verifyAuth, verifyDefault, add_address)
addressRouter.post('/get_all_address', verifyAuth, get_all_address)
addressRouter.post('/delete_address', verifyAuth, delete_address)
addressRouter.post('/get_address', verifyAuth, get_address)
addressRouter.post('/update_address', verifyAuth, verifyDefault, update_address)

module.exports = addressRouter

